-
Couldn't load subscription status.
- Fork 1
Update reader/config.scala #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Without thinking about the for comprehension, look at how using the map method seems to push the need to instantiate configuration all the way up to main. The problem is that then you have to deal with "ConfigReader"'s everywhere.
|
Ok, I like where this is going, but it's still not very compelling (imo) I'm imagining there are two parties involved in the test app. Party1 is |
|
We only had ConfigReaders roaming around when we started to involve functions that required Configuration. Note that the two core functions, which only depended on a UrlServiceClient, were unchanged. We haven't gained anything when contrasted with having a global Configuration object, though. I'll try to come up with an example with your last example. |
|
Maybe I misunderstood your example. It looks like after config was involved |
|
The two functions that took a What's interesting, imo, is that the need to actually pass the Config was pushed all the way up to the outermost method. Yes, it meant that The question becomes: do you want them around everywhere when it's just as easy to put |
|
I will take almost anything over lazy vals :) In poc we have an absolute |
|
I can't actually read your comment because it's wrapped in an |
Without thinking about the for comprehension, look at how using the map method seems to push the need to instantiate configuration all the way up to main.
The problem is that then you have to deal with "ConfigReader"'s everywhere.